﻿using System.ComponentModel;
using System.Runtime.CompilerServices;

namespace RollCall
{
    public class BaseViewModel : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        protected void OnPropertyChanged([CallerMemberName] string name = "", params string[] names)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
            if (names == null) return;
            foreach (var item in names)
            {
                PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
            }
        }
    }
}
